<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
    <link rel="stylesheet" href="./element-ui/lib/theme-chalk/index.css">
    <script src="./element-ui/lib/index.js"></script>

    <link rel="stylesheet" href="./css/normalize.css">
    <link rel="stylesheet" href="./css/global.css">

    <link rel="stylesheet" href="./css/register.css">

</head>

<body>
    <div id="app">
        <el-card class="box-card">
            <h3>开始注册博客吧</h3>
            <el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px"
                class="demo-ruleForm">
                <el-form-item label="账号" prop="username">
                    <el-input type="text" v-model="ruleForm.username"></el-input>
                </el-form-item>
                <el-form-item label="密码" prop="pass">
                    <el-input type="password" v-model="ruleForm.pass" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="确认密码" prop="checkPass">
                    <el-input type="password" v-model="ruleForm.checkPass" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
                    <el-button @click="resetForm('ruleForm')">重置</el-button>
                </el-form-item>
            </el-form>
        </el-card>


        <el-dialog title="提示" :visible.sync="centerDialogVisible" width="30%" center>


            <el-result v-if="registerSuccess==true" icon="success" title="成功提示" sub-title="你已经注册成功">
                <template slot="extra">
                    <el-button type="primary" size="medium" @click="centerDialogVisible = false">返回</el-button>
                </template>
            </el-result>


            <el-result :v-if="registerSuccess==false" icon="error" title="错误提示" sub-title="该账号已被注册">
                <template slot="extra">
                    <el-button type="primary" size="medium" @click="centerDialogVisible = false">返回</el-button>
                </template>
            </el-result>
        </el-dialog>

    </div>
</body>

<script src="./js/register.js"></script>

</html>